<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/jsp/taglibs.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" content="">
<meta http-equiv="Cache-Control" content="max-age=86400 public">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<script type="text/javascript" src="${ctx }/web/js/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="${ctx }/web/js/1.js"></script>
    <script type="text/javascript" src="${ctx }/web/js/2.js"></script>
    <script type="text/javascript" src="${ctx }/web/js/lubotu.js"></script>
    <link href="${ctx }/web/css/style.css" rel="Stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="${ctx }/web/css/basic.css">
</head>
<body>
<div class="clearfix">
<div class="banbo clearfix">
    <div class="test" >
    <%@ include file="web-top.jsp"%>
        <div class="mainbg">
        <div class="clearfix">
            <!--- 内容区 --->
            <div title="内容区" style="width: 100%;">
		            	<div class="map_txt" style="width: 98%;height: 30px; padding-top: 30px;font-size: 14px;padding-left: 20px; margin:0 auto 20px; border-bottom:1px solid #dedede;">
		                	当前位置 : <a href="${ctx }" target="_blank">首页</a>  >  店铺搜索结果  
		                </div>
                <div title="店铺展示区" style="width:98.5%; float: left; margin:0 auto;">
            		<div class="bango" style="height:auto;padding: 8px;">
				         <div class="shangchen clearfix" id="goods_list">
				        	<table style="width: 98.5%;">
				        		<tr style="height: 40px;">
				        			<th align="left">&nbsp;</th><th align="left">店铺名称</th><th align="left" style="width: 120px;padding: 10px;">店主</th><th align="left" style="width: 20%;padding: 4px;">主营商品类型</th><th align="left" style="width: 220px;padding: 4px;">店铺地址</th><th align="left" style="width: 140px;padding: 4px;">店铺电话</th><th align="left" style="width: 140px;padding: 4px;">创建时间</th>
				        		</tr>
				        		<c:forEach items="${shopList}" var="shop">
				        		<tr style="background-color: #fff;height: 80px;">
				        			<td  style="width: 10%;padding: 10px;"><img src="${ctx }/file_resource/${shop.shopLogo}" width="80px;"/></td><td ><a href="${ctx }/web/shopIndex?shopId=${shop.shopId}" target="_blank">${shop.shopName}</a></td><td style="padding: 10px;">${shop.userName}</td><td style="padding: 10px;">${shop.goodsTypes}</td><td style="padding: 10px;">${shop.shopAddress}</td><td style="padding: 10px;">${shop.shopTel}</td><td style="padding: 10px;"><fmt:formatDate value="${shop.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
				        		</tr>
				        		</c:forEach>
				        	</table>
				         </div>
               		</div>
               		<!-- 分页实现区 -->
               		
						 <div class="pagination" style="padding-left: 20px;"><ul><li>
						 <c:choose>
						 	<c:when test="${page.pageNo == 1}"><span style="color: #ccc;">首页</span></c:when>
						 	<c:otherwise><a href='javascript:void(0);' onclick="goPage(1)"><span style="color: #ccc;">首页</span></a></c:otherwise>
						 </c:choose>
						 </li><li>
						 <c:choose>
						 	<c:when test="${page.pageNo > 1}"><a href='javascript:void(0);' onclick="goPage(${page.pageNo-1})"><span style="color: #ccc;">上一页</span></a></c:when>
						 	<c:otherwise><span style="color: #ccc;">上一页</span></c:otherwise>
						 </c:choose>
						 </li>
						 <c:choose>
						 	<c:when test="${page.totalPages<6}">
						 		<c:forEach begin="1" end="${page.totalPages}" var="p">
						 			<c:choose>
						 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
						 				<c:otherwise><li><a href='javascript:void(0);' onclick="goPage(${p})"><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
						 			</c:choose>
						 		</c:forEach>
						 	</c:when>
						 	<c:otherwise>
						 		<c:choose>
						 			<c:when test="${page.pageNo>3 && page.totalPages>=page.pageNo+2}">
						 				<c:forEach begin="${page.pageNo-2}" end="${page.pageNo+2}" var="p">
								 			<c:choose>
								 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
								 				<c:otherwise><li><a href='javascript:void(0);' onclick="goPage(${p})"><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
								 			</c:choose>
								 		</c:forEach>
						 			</c:when>
						 			<c:when test="${page.pageNo>3 && page.totalPages<page.pageNo+2}">
						 				<c:forEach begin="${page.totalPages-4}" end="${page.totalPages}" var="p">
								 			<c:choose>
								 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
								 				<c:otherwise><li><a href='javascript:void(0);' onclick="goPage(${p})"><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
								 			</c:choose>
								 		</c:forEach>
						 			</c:when>
						 			<c:otherwise>
						 				<c:forEach begin="1" end="5" var="p">
								 			<c:choose>
								 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
								 				<c:otherwise><li><a href='javascript:void(0);' onclick="goPage(${p})"><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
								 			</c:choose>
								 		</c:forEach>
						 			</c:otherwise>
						 		</c:choose>
						 	</c:otherwise>
						 </c:choose>
						 <li>
						 <c:choose>
						 	<c:when test="${page.pageNo<page.totalPages}"><a href='javascript:void(0);' onclick="goPage(${page.pageNo+1})"><span style="color: #ccc;">下一页</span></a></c:when>
						 	<c:otherwise><span style="color: #ccc;">下一页</span></c:otherwise>
						 </c:choose>
						 </li><li>
						 <c:choose>
						 	<c:when test="${page.pageNo==page.totalPages}"><span style="color: #ccc;">末页</span></c:when>
						 	<c:otherwise><a href='javascript:void(0);' onclick="goPage(${page.totalPages})"><span style="color: #ccc;">末页</span></a></c:otherwise>
						 </c:choose>
						 </li></ul> </div>
                    </div>
                </div>
            </div>
        </div>
        <%@ include file="web-buttom.jsp"%>
        </div>
    </div>
</div>
</div>
<form action="${ctx }/web/webSelect" method="post" id="selectGoodsForm">
	<input type="hidden" id="goodsName" name="goodsName" value="${goodsName }"/>
	<input type="hidden" id="pageNo" name="pageNo" value="${page.pageNo }"/>
	<input type="hidden" name="selType" value="${selType }"/>
	<input type="hidden" name="selName" value="${selName }"/>
</form>
</body>
</html>
<<script type="text/javascript">
<!--
	function goPage(pageNo){
		$('#pageNo').val(pageNo);
		$('#selectGoodsForm').submit();
	}
//-->
</script>
